<template>
   <div class="app-container">
     <h2 style="text-align: center;">发布新课程</h2>
     <el-steps :active="active" finish-status="success" simple style="margin-bottom: 2rem">
       <el-step title="填写课程基本信息" />
       <el-step title="创建课程大纲" />
       <el-step title="发布课程" />
     </el-steps>
     <info v-if="active === 0" />
     <chapter v-if="active === 1" />
     <publish v-if="active === 2 || active === 3"/>
   </div>
</template>
<script>
import Info from "@/views/vid/course/components/info";
import Chapter from "@/views/vid/course/components/chapter";
import Publish from "@/views/vid/course/components/publish";

export default {
  components:{Info,Chapter,Publish},//注册组件
  data(){
    return {
      active: 0,
      courseId: null
    }
  },
  created() {
    if (this.$route.params.id){
      this.courseId = this.$route.params.id
    }
    if (this.$route.name === 'courseEdit'){
      this.active = 0
    }
    if (this.$route.name === 'courseChapterEdit'){
      this.active = 1
    }
  },
  methods:{

  }
}
</script>

<style scoped lang="scss">

</style>
